﻿<!--?
	session_start();

	if ($_SESSION['ID'] == "") 
	{
		echo "Please Login!";
		echo "<meta http-equiv='refresh' content='2;url=http://gisonline.mwa.co.th/dss'/>";
		session_destroy();
	exit();

	}


	if ($_SESSION['STATUS'] != "USER") 
	 {
		   
	 exit();
	 
	
}
?-->
<!DOCTYPE html> 
<html> 
<head>
	<title>MWA Online GIS</title> 
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" >
	<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no, width=device-width">
	<meta name="apple-mobile-web-app-capable" content="yes"/>
	<!--To hide address bar-->
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
	
	
	
	<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script>
	<script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"></script>
	<script type="text/javascript" src="./js/geoxml3.js"></script>
	<!--script src="js/maps.js"</script-->
	
	<!--Add the Javascript API reference-->
	<!--script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4compact/"></script-->
	<!--link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/dojo/dijit/themes/claro/claro.css"-->    
    <!--link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/esri/css/esri.css"-->
	<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.css" />
	<link rel="stylesheet" media="screen and (max-width: 800px)"  href="./css/style800.css">
	<link rel="stylesheet" media="screen and (max-width: 480px)"  href="./css/style480.css">
	<link rel="stylesheet" media="screen and (max-width: 320px)"  href="./css/style320.css">
	<link rel="stylesheet" media="screen and (min-width: 480px)"  href="./css/style.css">
	<link rel="apple-touch-icon" href="css/images/apple-touch-icon.png" /> 
	
	<!---arcgis
	<script src="js/arcgislink.js" type="text/javascript"></script-->
	<!--script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=true"></script-->
	<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?libraries=weather&sensor=true"></script>
	<!--script src="http://maps.google.com/maps?file=api&v=2&key=abcdefg" type="text/javascript"></script-->
	<script type="text/javascript" src="http://www.google.com/jsapi"></script>
	<!--script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/arcgislink/src/arcgislink.js"></script-->
	<script type="text/javascript" src="./js/ags.js" ></script>			<!--modified arcgis link for google maps utilty-->
	<script type="text/javascript" src="./js/geoxml3.js"></script>		<!--KML processor for the Google Maps JavaScript API V3 for reading GIS Camera reporter KML links-->
	<script type="text/javascript" src="./js/gjs.js"></script>			<!--google maps api function-->
	<style>
		
		
		
	</style>
	<script>
		
	
		
	</script>
</head> 
<!-- for Google API v.2 >
<body onload="initialize();" onunload="GUnload();"--> 
<body onload="init();">
	<?php include_once("./cgi-bin/analyticstracking.php") ?>
	<div data-role="page" data-dojo-type="dojox.mobile.View" selected="true">
		
		<!-- /header -->
		
		<div id="header">
			<!--a href="#" id="geolocation" data-role="button" data-icon="search" style="position:absolute; right: 250px; top: 2px; z-index: 20;"  data-inline="true">Geolocation</a>
			
			<a href="#layers" data-rel="popup" data-role="button" data-icon="bars" style="position:absolute; right: 140px; top: 2px; z-index: 20;"  data-inline="true">Layers</a-->
			
			<!--a href="settings.html" data-rel="dialog" data-role="button" data-icon="bars" data-iconpos="notext" style="position:absolute; right: 20px; z-index: 20;" data-inline="true"  data-transition="slidedown">Dialog</a>
			<a href="#mypanel" data-role="button" data-icon="bars" data-iconpos="notext" style="position:absolute; right: 60px; z-index: 250;" data-inline="true">Panel</a-->
			
			<div id="logo"></div>
			<div id="tools">
				
				<a href="#" id="geolocation" title="Current Location" class="geolocation_button">Geolocation</a>
				<a href="#search_popup" data-rel="popup"  title="Search" class="search_button">Search</a>
				<a href="#engineering_popup" data-rel="popup" title="Engineering Layers"class="eng_button">Engineering Layers</a>
				<a href="#waterresource_popup" data-rel="popup" title="Water Resources Layers" class="water_button">Water Resources Layers</a>
				<a href="#service_popup" data-rel="popup" title="Service Layers" class="service_button">Service Layers</a>
				<a href="#basemap_popup" data-rel="popup" title="Basemap" class="basemap_button" class="search_button">Basemap</a>
				<a href="#report_popup" class="report_button" data-rel="popup" title="Reports">Reports</a>
				
				
			</div>
			<!--div id = "addons">
				<a href="#youtube_popup" class="youtube_button" data-rel="popup" title="Youtube Help">Youtube Help</a>
				<a href="#" class="youtube_button" data-rel="popup" title="Reports">Send to Line</a>
			</div-->
			<div id="Username"> <?echo "สวัสดีคุณ ".$_SESSION['USER_ID'];?></div>
			<div id="versiontxt">Version 1.3</div>
			<div id="UserOnline">ขณะนี้มีผู้ใช้งานอยู่:  คน</div>
			<div id="logout_div">
				<a id = "logout" href="#" class="logout_button">Logout</a>
			</div>
			
		</div>
		
		<div dojotype="dijit.layout.BorderContainer" design="headline" gutters="true">
	
			<div id="map" dojotype="dijit.layout.ContentPane" region="center">
			</div>
		</div>
		<div data-role="popup" id="noResults_popup" data-theme="e" data-position-to="window" class="overflow_popup">
            <p>ไม่พบข้อมูลที่คุณต้องการ กรุณาลองใหม่อีกครั้ง</p>
        </div>
		<div id="report_popup" data-role="popup" data-overlay-theme="a"  data-position-to="window">
			   <iframe id="frame" src="http://gisonline.mwa.co.th/dss/graph/graph.php" width="500" height="500"></iframe>
		</div>
		<!--div id="youtube_popup" data-role="popup"  data-overlay-theme="a"  data-position-to="window">
			<a class="ui-btn-right" data-icon="delete" data-iconpos="notext" data-rel="back" data-role="button" data-theme="a" href="#" data-corners="true" data-tolerance="0,0">Close</a>
			<iframe width="420" height="315" src="http://www.youtube.com/embed/AIX5SzXUbSU" frameborder="0" allowfullscreen></iframe>
		</div-->
		<div data-role="popup" id="search_popup" data-position-to="window" style="width: 210px;	padding: 10px;">
			<input type="search" disabled="disabled" id="dbsearch_address" value="อยู่ระหว่างการพัฒนา">
			<button id="dbsearch_button" onclick="closePopup();" disabled="">GIS Search</button>
			<br/>
			<input type="search" id="gsearch_address" value="">
			<button id="gsearch_button" onclick="closePopup();">Google Search</button>
		</div>
		<div data-role="popup" id="basemap_popup" style="width:200px; margin-left: 10px;" data-theme="d" data-overlay-theme="a"  data-position-to="window"><!--POPUP-->
			<form>
				<fieldset data-role="controlgroup" >
					<input type="radio" name="radio-choice-1" id="radio-choice-1" value="hybrid" class="popup_basemap2">
					<label for="radio-choice-1">Hybrid Maps</label>
					<input type="radio" name="radio-choice-1" id="radio-choice-2" value="streets" checked="checked" class="popup_basemap2">
					<label for="radio-choice-2">Streets Maps</label>
					<input type="radio" name="radio-choice-1" id="radio-choice-3" value="openstreet" class="popup_basemap2">
					<label for="radio-choice-3">Open Street Maps</label>
					<input type="radio" name="radio-choice-1" id="radio-choice-4" value="esri" class="popup_basemap2">
					<label for="radio-choice-4">World Street Map</label>
					<input type="radio" name="radio-choice-1" id="radio-choice-5" value="cache" class="popup_basemap2">
					<label for="radio-choice-5">MWA Maps (1:1000)</label>
				</fieldset>
			</form>
					
		</div>
		<div data-role="popup" id="engineering_popup" class="overflow_popup" data-theme="d" data-overlay-theme="a"  data-position-to="window"><!--POPUP-->
			<form>
				<fieldset data-role="controlgroup" data-inset="true" data-theme="c">
					<input type="checkbox" name="checkbox-select-futurepipes" id="checkbox-select-futurepipes" value="futurepipes" class="engineering_kml" />
					<label for="checkbox-select-futurepipes">แผนที่ท่อประธานที่อยู่ระหว่างการก่อสร้าง</label>
					<input type="checkbox" name="checkbox-select-replacemain" id="checkbox-select-replacemain" value="replacemain" class="engineering_kml" />
					<label for="checkbox-select-replacemain">แผนที่จุดเสี่ยงท่อประธานแตกรั่ว</label>
					<input type="checkbox" name="checkbox-select-ACPipe" id="checkbox-select-ACPipe" value="ACPipe" class="engineering_kml" />
					<label for="checkbox-select-ACPipe">แผนที่ท่อ AC</label>
					<input type="checkbox" name="checkbox-select-dma" id="checkbox-select-dma" value="dma" class="engineering_kml" />
					<label for="checkbox-select-dma">พื้นที่เฝ้าระวังน้ำสูญเสีย (DMA)</label>
					<input type="checkbox" name="checkbox-select-publicwater" id="checkbox-select-publicwater" value="publicwater" class="engineering_kml" />
					<label for="checkbox-select-publicwater">ตำแหน่งตู้ดื่มน้ำ ตู้น้ำหยอดเหรียญ</label>
					<input type="checkbox" name="checkbox-select-branch"  id="checkbox-select-branch" value="branch" class="engineering_kml" />
					<label for="checkbox-select-branch">พื่นที่รับผิดชอบของสาขา</label>
					<input type="checkbox" name="checkbox-select-servicearea"  id="checkbox-select-servicearea" value="servicearea" class="engineering_kml" />
					<label for="checkbox-select-servicearea">พื้นที่ให้บริการของ กปน.</label>
					<input type="checkbox"  name="checkbox-select-stolenmeter"  id="checkbox-select-stolenmeter" value="stolenmeter" class="engineering_kml" />
					<label for="checkbox-select-stolenmeter">ตำแหน่งมาตรวัดน้ำหาย (พค.)</label>
					<div data-role="collapsible-set" data-corners="false" data-theme="c" data-content-theme="c" style="margin: 0;" data-collapsed-icon="arrow-r" data-expanded-icon="arrow-d">
						<div data-role="collapsible">
							<h3>แผนที่ท่อประปารายโซน</h3>
							<fieldset data-role="controlgroup">
								<input type="radio" name="radio-select-brach" id="radio-select-b1" value="01" class="branch_kml" />
								<label for="radio-select-b1">สาขาบางกอกน้อย</label>
								<input type="radio" name="radio-select-brach" id="radio-select-b2" value="02" class="branch_kml" />
								<label for="radio-select-b2">สาขาตากสิน</label>
								<input type="radio" name="radio-select-brach" id="radio-select-b3" value="03" class="branch_kml" />
								<label for="radio-select-b3">สาขาพญาไท</label>
								<input type="radio" name="radio-select-brach" id="radio-select-b4" value="04" class="branch_kml" />
								<label for="radio-select-b4">สาขานนทบุรี</label>
								<input type="radio" name="radio-select-brach" id="radio-select-b5" value="05" class="branch_kml" />
								<label for="radio-select-b5">สาขาทุ่งมหา</label>
								<input type="radio" name="radio-select-brach" id="radio-select-b6" value="06" class="branch_kml" />
								<label for="radio-select-b6">สาขาแม้นศรี</label>
								<input type="radio" name="radio-select-brach" id="radio-select-b7" value="07" class="branch_kml" />
								<label for="radio-select-b7">สาขาสุขุมวิท</label>
								<input type="radio" name="radio-select-brach" id="radio-select-b11" value="11" class="branch_kml" />
								<label for="radio-select-b11">สาขาภาษีเจริญ</label>
								<input type="radio" name="radio-select-brach" id="radio-select-b12" value="12" class="branch_kml" />
								<label for="radio-select-b12">สาขาลาดพร้าว</label>
								<input type="radio" name="radio-select-brach" id="radio-select-b13" value="13" class="branch_kml" />
								<label for="radio-select-b13">สาขาพระโขนง</label>
								<input type="radio" name="radio-select-brach" id="radio-select-b14" value="14" class="branch_kml" />
								<label for="radio-select-b14">สาขาสุขสวัสดิ์</label>
								<input type="radio" name="radio-select-brach" id="radio-select-b15" value="15" class="branch_kml" />
								<label for="radio-select-b15">สาขาประชาชื่น</label>
								<input type="radio" name="radio-select-brach" id="radio-select-b16" value="16" class="branch_kml" />
								<label for="radio-select-b16">สาขาบางเขน</label>
								<input type="radio" name="radio-select-brach" id="radio-select-b17" value="17" class="branch_kml" />
								<label for="radio-select-b17">สาขาสมุทรปราการ</label>
								<input type="radio" name="radio-select-brach" id="radio-select-b53" value="53" class="branch_kml" />
								<label for="radio-select-b53">สาขามีนบุรี</label>
								<input type="radio" name="radio-select-brach" id="radio-select-b54" value="54" class="branch_kml" />
								<label for="radio-select-b54">สาขาบางบัวทอง</label>
								<input type="radio" name="radio-select-brach" id="radio-select-b55" value="55" class="branch_kml" />
								<label for="radio-select-b55">สาขาสุวรรณภูมิ</label>
								<input type="radio" disabled = "disabled" name="radio-select-brach" id="radio-select-b56" value="56" class="branch_kml" />
								<label for="radio-select-b56">สาขามหาสวัสดิ์</label>
								
							</fieldset>
						</div>
						<div data-role="collapsible">
							<h3>ข้อมูลพิกัดประตูน้ำท่อประธาน</h3>
							<fieldset fieldset data-role="controlgroup">
								<input type="checkbox" name="checkbox-select-region1" data-theme="d" id="checkbox-select-region1" value="region1" class="engineering_kml" />
								<label for="checkbox-select-region1">ภาค 1</label>
								<input type="checkbox" name="checkbox-select-region2" data-theme="d" id="checkbox-select-region2" value="region2" class="engineering_kml" />
								<label for="checkbox-select-region2">ภาค 2</label>
								<input type="checkbox" name="checkbox-select-region3" data-theme="d" id="checkbox-select-region3" value="region3" class="engineering_kml" />
								<label for="checkbox-select-region3">ภาค 3</label>
								<input type="checkbox" name="checkbox-select-region4" data-theme="d" id="checkbox-select-region4" value="region4" class="engineering_kml" />
								<label for="checkbox-select-region4">ภาค 4</label>
							</fieldset>
						</div>
					</div>
					
					
				</fieldset>
			</form>
		</div>
		<div data-role="popup" id="waterresource_popup" class="overflow_popup" data-theme="d" data-overlay-theme="a"  data-position-to="window"><!--POPUP-->
			<form>
				<fieldset data-role="controlgroup" data-inset="true" data-theme="c">
					<input type="checkbox" name="checkbox-select-rainaccumulation3hr" id="checkbox-select-rainaccumulation3hr" value="rainaccumulation3hr" class="waterresource_checkbox" />
					<label for="checkbox-select-rainaccumulation3hr">แผนที่ปริมาณน้ำฝนสะสมราย 3 ชั่วโมง </label>
					<input type="checkbox" name="checkbox-select-globalcloud" id="checkbox-select-globalcloud" value="globalcloud" class="waterresource_checkbox"/>
					<label for="checkbox-select-globalcloud">แผนที่กลุ่มเมฆ</label>
					<input type="checkbox" name="checkbox-select-autoweather" id="checkbox-select-autoweather" value="autoweather" class="waterresource_checkbox"/>
					<label for="checkbox-select-autoweather">ข้อมูลสถานีตรวจวัดอากาศอัตโนมัติ</label>
					<input type="checkbox" name="checkbox-select-waterlevel" id="checkbox-select-waterlevel" value="waterlevel" class="waterresource_checkbox" />
					<label for="checkbox-select-waterlevel">แผนที่ระดับน้ำโทรมาตร</label>
					<input type="checkbox" name="checkbox-select-earthquakes" id="checkbox-select-earthquakes" value="earthquakes" class="waterresource_checkbox" />
					<label for="checkbox-select-earthquakes">แผนที่แผ่นดินไหว</label>
					<input type="checkbox" name="checkbox-select-bmaroadproject" id="checkbox-select-bmaroadproject" value="bmaroadproject" class="waterresource_checkbox" />
					<label for="checkbox-select-bmaroadproject">เส้นทางที่ กทม. มีแผนปรับปรุงถนน</label>
					<input type="checkbox" name="checkbox-select-ngv" id="checkbox-select-ngv" value="ngv" class="waterresource_checkbox" />
					<label for="checkbox-select-ngv">ข้อมูลตำแหน่งปั้ม GAS NGV</label>
					<input type="checkbox" name="checkbox-select-traffic" id="checkbox-select-traffic" value="traffic"/>
					<label for="checkbox-select-traffic">แผนที่สภาพจราจร</label>
					<input type="checkbox" disabled="disabled" name="checkbox-select-cctv" id="checkbox-select-cctv" value="cctv" class="waterresource_checkbox" />
					<label for="checkbox-select-cctv">กล้อง CCTV</label>
				</fieldset>
			</form>
		</div>
		<div data-role="popup" id="service_popup" class="overflow_popup" data-theme="d" data-overlay-theme="a"  data-position-to="window"><!--POPUP-->
			<form>
				<fieldset data-role="controlgroup" data-inset="true" data-theme="c">
					<input type="checkbox" name="checkbox-select-connect" id="checkbox-select-connect" value="connect" class="service_kml"/>
					<label for="checkbox-select-connect">ตำแหน่งงานบรรจบท่อ (R)</label>
					<input type="checkbox" name="checkbox-select-mainleak" id="checkbox-select-mainleak" value="mainleak" class="service_kml" />
					<label for="checkbox-select-mainleak">ข้อมูลท่อประธานแตกท่อรั่ว (R)</label>
					<input type="checkbox" id="checkbox-select-effectivearea" value="effectivearea" class="service_kml" />
					<label for="checkbox-select-effectivearea">พื้นที่ผลกระทบเนื่องจากการปิดน้ำ (R)</label>
					<input type="checkbox" id="checkbox-select-engproj" value="engproj" class="service_kml" />
					<label for="checkbox-select-engproj">ตำแหน่งงานด้านวิศวกรรม (R)</label>
					<input type="checkbox" id="checkbox-select-PR" value="PR" class="service_kml" />
					<label for="checkbox-select-PR">ตำแหน่งงานประชาสัมพันธ์ทั่วไป (R)</label>
					<input type="checkbox" id="checkbox-select-mainraise" value="mainraise" class="service_kml" />
					<label for="checkbox-select-mainraise">ตำแหน่งยกหีบประตูน้ำ (R)</label>
					<!--input type="checkbox" id="checkbox-select-test" value="test" class="service_kml" />
					<label for="checkbox-select-test">test</label-->
					
				</fieldset>
			</form>
		</div>
		<div id="label">
			<p id="longlatlabel">Click on the map for long/lat	</p>
		</div>
		
	</div><!-- /page -->
	
</body>
</html>